<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name) {
          this.name = name
        }
        Person.prototype.say = function () {
            console.log('hello')
        }
        const zgdl = new Person('zgdl')
        console.log(zgdl);
        
        function Girl(name, age) {
          Person.call(this, name)
          this.age = age
        }
        Girl.prototype = Object.create(Person.prototype)
        // Girl.prototype.constructor = Girl
        Girl.prototype.say = 100
        const chengguo = new Girl('chengguo', 26)
        console.log(chengguo)
    </script>
</body>
</html>